/*
  This file is part of the NextText project.
  http://www.nexttext.net/

  Copyright (c) 2004-08 Obx Labs / Jason Lewis

  NextText is free software: you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software 
  Foundation, either version 2 of the License, or (at your option) any later 
  version.

  NextText is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 
  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with 
  NextText.  If not, see <http://www.gnu.org/licenses/>.
*/

package net.nexttext.input;

import java.awt.event.MouseEvent;

/**
 * An event generated by the mouse.
 *
 * <p>This is a wrapper around the {@link MouseEvent} class.  All IDs returned 
 * by the functions of this class are the same IDs used in the
 * Java {@link MouseEvent} class.</p>
 */
/* $Id: MouseInputEvent.java 22 2008-04-20 12:25:25Z prisonerjohn $ */
public class MouseInputEvent extends InputEvent {

	// The mouse event
	MouseEvent event;
	
	/**
	 * Class constructor
	 *
	 * @param	event	the generated event
	 */
	 public MouseInputEvent(MouseEvent event) {
	 	this.event = event;
	 }
	 
	 /**
	  * Gets the type of event
	  *
	  * @return		the type of event
	  */
	 public int getType() {
	 	return event.getID();
	 }
	 
	 /**
	  * Gets the button attached to the event
	  *
	  * @return		the button id
	  */
	 public int getButton() {
	 	return event.getButton();
	 }
	 
	 /**
	  * Gets the x position of the mouse at the event
	  *
	  * @return		the x position
	  */	 
	 public int getX() {
	 	return event.getX();
	 }
	 
	 /**
	  * Gets the y position of the mouse at the event
	  *
	  * @return		the y position
	  */	 
	 public int getY() {
	 	return event.getY();
	 }
}
